# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=fq
pkgver=0.9.0
pkgrel=0
pkgdesc="Tool, language and decoders for inspecting binary data"
url="https://github.com/wader/fq"
license="MIT"
arch="all !ppc64le" # fails tests
makedepends="go"
checkdepends="expect"
source="https://github.com/wader/fq/archive/v$pkgver/fq-$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	make fq
}

check() {
	GO_TEST_RACE_FLAGS= make test
}

package() {
	install -Dm755 fq -t "$pkgdir"/usr/bin/
}

sha512sums="
4b8fdf25cd4aa255d4f689d612c1f43997e277fa4b4f522a0b346ec55ebdbeef93a20fdfb78a2c23df16a475c70abebec507145f0fb8d2ca1d3f564076b2ddad  fq-0.9.0.tar.gz
"
